<div id="sidebar">
	<div id="rss"><a href="{{ blog.feedurl }}"><span id="rss-pic"></span></a></div>
	{% include "search.html" %}
	<ul id="sidebarul">
		
		<li>
			<h2>公告栏</h2>
			<p>
				{{blog.blognotice}}
			</p>
		</li>	

		<li>
			<h2>最新文章</h2>
			{% if blog.recentposts %}
			<ul>
				{% for entry in blog.recentposts %}
				<li><a href="/{{entry.link|escape}}" title="{{entry.title|escape}}">{{entry.title|escape}}</a>({{entry.readtimes}})</li>
				{%endfor%}
			</ul>
			{% endif %}
		</li>	
		
		<li>
			<h2>最新评论</h2>
			{% if recent_comments %}
			<ul>
				{% for comment in recent_comments %}
				<li>
				<a href="/{{comment.entry.link|escape}}#comment-{{comment.key.id}}" title="发表于：{{comment.entry.title|escape}}">{{comment.author}}</a>&nbsp;说道：{{comment.shortcontent}}...
				</li>
				{%endfor%}
			</ul>
			{% endif %}
		</li>

		<li>
			<h2>热门文章</h2>
			{% if blog.hotposts %}
			<ul>
				{% for entry in blog.hotposts %}
				<li><a href="/{{entry.link|escape}}" title="{{entry.title|escape}}">{{entry.title|escape}}</a>({{entry.readtimes}})</li>
				{%endfor%}
			</ul>
			{% endif %}
		</li>	

		
		<li>
			<h2>文章分类</h2>
			{% if categories %}
			<ul class="side-cat" >
				{%for cate in categories%}
				<li><a href="/category/{{cate.slug}}">{{cate.name}}</a>({{cate.count}})</li>
				{%endfor%}
			</ul>
			{% endif %}
			<div class="clear"></div>    
		</li>

		<li>
			<h2>归档</h2>
			{% if archives %}
			<ul class="side-cat" >
				{%for archive in archives%}
				<li><a href="/{{archive.year}}/{{archive.month}}">{{archive.year}}年{{archive.month}}月</a>({{archive.entrycount}})</li>
				{%endfor%}
			</ul>
			{% endif %}
			<div class="clear"></div> 
		</li>

		<li>
			<h2>标签云</h2>
			{% if alltags %}
			{% for t in alltags %}
			<a title="{{ t.tagcount }} pages" href="/tag/{{t.tag|urlencode}}"><span style='font-size:{{ t.tagcount|add:9 }}px;'>{{t.tag}}</span></a>
			{%endfor%}
			{% endif %}
		</li>

		<li>
			<h2>友情链接</h2>
			{% if blogroll %}
			<ul>
				{%for link in blogroll%}
				<li><a href="{{link.href}}" target="_blank">{{link.linktext}}</a></li>
				{%endfor%}
			</ul>
			{% endif %}
		</li>
		
		<li>
			<h2>快捷链接</h2>
			<ul id="langpref">
				<li>管理操作</li>
			</ul>
		</li>
		
		<li>
			<ul>
				<li><a rel="external nofollow" id="feedrss" title="订阅这个博客的文章" href="{{ blog.feedurl }}"><abbr title="Really Simple Syndication">RSS</abbr> 订阅</a></li>
				<li><a rel="external nofollow" id="feedrsscomments" title="订阅这个博客的评论" href="{{ blog.feedurl }}/comments"><abbr title="Really Simple Syndication">RSS</abbr> 订阅评论</a></li>
			</ul>
		</li>
		
	</ul>
	
	<script type="text/javascript">
		<!--//
			function loginp()
			{
			   $.getJSON("/do/info_login", function(ret){
					  if( ret.islogin)
					  {
						html='<li><a href="{{self.logouturl}}">注销</a></li>';
						if (ret.isadmin)
						html+=' <li><a href="/admin">管理</a></li>';
						$('#langpref').html(html);

					  }
					  else
					  {$('#langpref').html('<li><a href="/admin">登录</a></li>');}
			   });
			}
			loginp();
		//-->
	</script>
</div>


